#!/usr/bin/env python
# -*- coding: utf-8 -*-

from weibopy.auth import OAuthHandler
from weibopy.api import API


consumer_key= '2878395190'
consumer_secret ='10aa081953af5cb5bc26b4839eb1cd02'
callback = 'http://apk.gfan.com'
auth = OAuthHandler(consumer_key, consumer_secret, callback)

auth_url = auth.get_authorization_url()

print 'Please authorize: ' + auth_url
#verifier = raw_input('PIN: ').strip()

#auth_access_token = auth.get_access_token(verifier)

#api = API(auth)
#print auth_access_token.key
#print auth_access_token.secret

#status = api.update_status(status='hello world', lat='12.3', long='45.6') # 注意status必须是UTF-8编码的字符串，经纬度是可以不写的
#print status.id
#print status.text
